/**
 * @author vastsoft-liuzy
 * @date 2014年8月20日 下午1:41:08
 */
package com.jiankangjin.weixinchannel.statuscode;

import java.util.HashMap;
import java.util.Map;

/**
 * 支付宝支付状态码,用于存入数据库和返回给移动应用端.<br>
 * 部分支付,属于订单的支付状态;支付记录没有部分支付.<br>
 */
public class PaymentStatusCode {
	public static final String IS_NOT_PAY		 = "0000";
	public static final String SOME_IS_PAY		 = "0001";
	public static final String APPLY_FOR_PAY	 = "0011";
	public static final String PAYMENTING		 = "0021";
	public static final String PAY_FAILED 		 = "0041";
	public static final String PAY_TIME_OUT		 = "0071";
	public static final String IS_PAYED 		 = "1001";
	public static final String ORDER_IS_PAYED 	 = "9001";
	public static final String UNKNOWN 			 = "9002";
	public static final String ERROR 			 = "9003";
	public static final String ORDER_NOT_EXIST	 = "9004";
	public static final String PAYMENT_NOT_EXIST = "9005";
	public static final String CHANEL_ID_ERROR 	 = "9006";
	
	
	private static final Map<String, String> sMap = new HashMap<String, String>();
	static {
		sMap.put(PaymentStatusCode.IS_NOT_PAY, "未支付");
		sMap.put(PaymentStatusCode.SOME_IS_PAY, "部分支付");
		sMap.put(PaymentStatusCode.APPLY_FOR_PAY, "申请支付");
		sMap.put(PaymentStatusCode.PAYMENTING, "用户支付处理中");
		sMap.put(PaymentStatusCode.PAY_FAILED, "支付失败");
		sMap.put(PaymentStatusCode.PAY_TIME_OUT, "支付超时已关闭或已全额退款");
		sMap.put(PaymentStatusCode.IS_PAYED, "成功支付");
		sMap.put(PaymentStatusCode.ORDER_IS_PAYED, "已支付的订单,请勿重复支付");
		sMap.put(PaymentStatusCode.UNKNOWN, "支付结未知,请另行获取支付状态");
		sMap.put(PaymentStatusCode.ERROR, "支付参数错误");
		sMap.put(PaymentStatusCode.ORDER_NOT_EXIST, "此订单不存在");
		sMap.put(PaymentStatusCode.PAYMENT_NOT_EXIST, "此订单不存在");
		sMap.put(PaymentStatusCode.CHANEL_ID_ERROR, "支付渠道ID错误");
	}
	
	
	public static String getDesc(String code) {
		return sMap.get(code);
	}
}
